//
//  LSDatePickViewController.m
//  LaSaCivilAffairsDepartment
//
//  Created by 聂志康 on 2018/12/24.
//  Copyright © 2018 wpkj. All rights reserved.
//

#import "LSDatePickViewController.h"

@interface LSDatePickViewController ()

@end

@implementation LSDatePickViewController

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.datePicker = [[UIDatePicker alloc] init];
        // 2.设置模式
        // self.datePicker.date = self.date;
//        NSDate* maxDate = [[NSDate alloc] initWithTimeIntervalSinceNow:0];
//        self.datePicker.maximumDate = maxDate;
        self.datePicker.datePickerMode = UIDatePickerModeDateAndTime;
        [self.view addSubview:_datePicker];
        //设置frame
        __weak typeof(self) weakSelf = self;
        
        [self.datePicker mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(weakSelf.view);
            make.centerY.equalTo(weakSelf.view.mas_centerY).with.offset(-42);
            make.width.mas_equalTo(ScreenWidth-16);
        }];
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
